package com.withyou.euraka.provide.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
 * @EnableScheduling
 * @Scheduled(cron="0/1 * * * * ? ")
 * @author guicheng.huang
 * @date 2020年4月26日
 */
@Component
public class CleanTask {

	/**
	 * 底层是jdk 的
	 * @throws InterruptedException
	 */
	@Scheduled(cron="0/1 * * * * ? ")
	public void task() throws InterruptedException{
		Thread.sleep(2000);
		System.out.println("线程id>"+Thread.currentThread().getName()+"--"+System.currentTimeMillis());
	}
}
